package com.kch.system.service.impl;

import com.kch.system.domain.SysBanner;
import com.kch.system.mapper.SysBannerMapper;
import com.kch.system.service.ISysBannerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

@Service
public class SysBannerServiceImpl implements ISysBannerService {

    @Autowired
    private SysBannerMapper sysBannerMapper;

    @Override
    public List<SysBanner> selectMeetingPage(SysBanner sysBanner) {
        return sysBannerMapper.selectPageList(sysBanner);
    }

    @Override
    public int insertSysBanner(SysBanner sysBanner) {
        sysBanner.setCreateTime(new Date());
        return sysBannerMapper.insert(sysBanner);
    }

    @Override
    public int deleteSysBanner(String ids) {
        return sysBannerMapper.deleteByPrimaryKey(Integer.valueOf(ids));
    }

    @Override
    public SysBanner selectById(Integer id) {
        return null;
    }

    @Override
    public int updateById(SysBanner sysBanner) {
        return 0;
    }
}
